from bilibili_api import live, sync
import asyncio
async def my_async_function():
    await asyncio.sleep(1)
    return "Hello, World!"

# 同步调用异步函数
result = sync(my_async_function())
print(result)  # 输出: Hello, World!